<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/7/13
  Time: 15:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:url var="loginUrl" value="/login"/>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>登录</title>
    <link rel="stylesheet" href="${ctx}/static/bootstrap/dist/css/bootstrap.min.css" type="text/css">
    <link rel="stylesheet" href="${ctx}/static/custom/css/login.css" type="text/css">
</head>
<body>
    <div class="box">
        <div class="login-box">
            <div class="text-center login-title">
                <h1><small>登录</small></h1>
            </div>
            <div class="login-content">
                <div class="error-msg">${error}</div>
                <div class="form" ng-app="loginApp" ng-controller="LoginController">
                    <form action="${loginUrl}" method="post">
                        <div class="form-group">
                            <div class="col-xs-12">
                                <div class="input-group">
                                        <span class="input-group-addon">
                                            <span class="glyphicon glyphicon-user"></span>
                                        </span>
                                    <input type="text" id="username" name="username" class="form-control" placeholder="用户名" ng-model="username">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-xs-12  ">
                                <div class="input-group">
                                        <span class="input-group-addon">
                                            <span class="glyphicon glyphicon-lock"></span>
                                        </span>
                                    <input type="password" id="password" name="password" class="form-control" placeholder="密码" ng-model="password">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-xs-4 col-xs-offset-4 ">
                                <button type="submit" class="btn btn-sm btn-info" ng-click="login()"><span class="glyphicon glyphicon-off"></span> 登录</button>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-xs-6 link">
                                <p class="text-center"><small>忘记密码？</small> <a href="javascript:void(0)" ><small>找回</small></a>
                                </p>
                            </div>
                            <div class="col-xs-6 link">
                                <p class="text-center"><small>还没注册?</small> <a href="javascript:void(0)" ><small>注册</small></a>
                                </p>
                            </div>
                        </div>
                        <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="${ctx}/static/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript" src="${ctx}/static/angular/angular.min.js"></script>
    <script type="text/javascript" src="${ctx}/static/bootstrap/dist/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="${ctx}/static/custom/app/LoginApp.js"></script>
    <script type="text/javascript" src="${ctx}/static/custom/app/controller/LoginController.js"></script>
</body>
</html>
